//
//  TileMenuView.h
//  SAYAKA_Table
//
//  Created by numanuma08 on 2013/07/20.
//  Copyright (c) 2013年 勘米良. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TileMenuPageView.h"
#import "TileMenuButton.h"

@protocol TileMenuViewDelegate;

@interface TileMenuView : UIView <TileMenuPageViewDelegate, TileMenuButtonDelegate, UIScrollViewDelegate> {
    IBOutlet UIScrollView *_mainScrollView;
    IBOutlet UIScrollView *_categoryScrollView;
    IBOutlet UIView *_tileMenuButtonArea1;
    IBOutlet UIView *_tileMenuButtonArea2;
    IBOutlet UIView *_tileMenuButtonArea3;
    IBOutlet UIView *_tileMenuButtonArea4;
    IBOutlet UIView *_tileMenuButtonArea5;
    NSInteger _currentPage;
    NSInteger _maxPage;
}
+ (id)tileMenuView;
- (void)update;
- (void)reload;
@property (strong, nonatomic) IBOutlet UIButton *settingButton;
@property (strong, nonatomic) IBOutlet UIButton *orderButton;
@property (nonatomic)id<TileMenuViewDelegate> delegate;
@property (nonatomic, strong) NSMutableArray *categoryItems;
@property (nonatomic, strong) TileMenuButton *tileMenuButton1;
@property (nonatomic, strong) TileMenuButton *tileMenuButton2;
@property (nonatomic, strong) TileMenuButton *tileMenuButton3;
@property (nonatomic, strong) TileMenuButton *tileMenuButton4;
@property (nonatomic, strong) TileMenuButton *tileMenuButton5;
@end


@protocol TileMenuViewDelegate <NSObject>
@optional
- (void)tileMenuView:(TileMenuView *)tileMenuView didSelectItem:(Item *)item;
- (void)tileMenuView:(TileMenuView *)tileMenuView didSelectCategory:(Category *)category;
@end
